home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / copy2to1.rpl < prev    next >
Text File  |  1991-09-17  |  945b  |  31 lines

  1. %%HP: T(3);
  2.  
  3. @ COPY2TO1, copies any card in port 2 to RAM card in port 1.
  4. @ by Joseph K Horn.
  5. @ Short and fast: 26 bytes long; 1 second to run.
  6. @ Download this listing as a string, then convert it to
  7. @   a Code object with ASCI-> in Rick Grevelle's HACKIT library.
  8. @ Ideal for the TDS bank-switching cards, because it is an exact
  9. @   bit copier: it makes an absolutely identical copy of any card.
  10.  
  11. @ ( *EQUate Table* )
  12. @ DOCODE     = #02DCC  * Code object prologue
  13. @ SAVPTR     = #0679B  * push regs
  14. @ PORT1      = #80000
  15. @ PORT2      = #C0000
  16. @ MOVEDOWN   = #0670C  * copy C.A nibs from (D0) to (D1)
  17. @ GETPTRLOOP = #05143  * pop regs & jump back to RPL
  18.  
  19. @ ( *Begin Copy2to1* )
  20.  
  21. "CCD20   @ DOCODE
  22.  F2000   @   length = 47 nibs
  23.  8FB9760 @   GOSBVL SAVPTR
  24.  1B0000C @   D0=HEX PORT2
  25.  1F00008 @   D1=HEX PORT1
  26.  3400004 @   LC(5) 128*2*1024
  27.  8FC0760 @   GOSBVL MOVEDOWN
  28.  8D34150 @ GOVLNG GETPTRLOOP
  29. "
  30. @ End of Copy2to1
  31.